package com.tyl.state;

public class JoinTest implements Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println("vip线程来了");
        }
    }

    public static void main(String[] args) throws InterruptedException {
        JoinTest joinTest=new JoinTest();
        Thread thread=new Thread(joinTest);
        thread.start();

        for (int i = 0; i < 1000; i++) {
            if(i==200){
                thread.join();
            }
            System.out.println("main"+i);
        }
    }
}